
import os
import pickle

DEAD = -1
ALIVE = -2
LIFE_STATE = "state"
BIRTH_TS = "birth_ts"
DEATH_TS = "death_ts"
IMAGE = "image"
MODEL = "model"


INF = 100000000

POLLING_DELAY = 0.3

FRONTEND_SRVC_PORT = 12345
CONFIG_SRVC_PORT = 12346
LOOPER_SRVC_PORT = 22345
POP_SRVC_PORT = 22346

PROJECT_DIR = os.path.abspath(__file__)
for i in range(3):
    PROJECT_DIR = os.path.dirname(PROJECT_DIR)
TEMP_SCHEMA_DIR = os.path.join(PROJECT_DIR, "dexen", "system", "client", "temp")
SCHEMAS_DIR = os.path.join(PROJECT_DIR, "dexen", "user", "schemas")
OUTPUT_DIR = os.path.join(PROJECT_DIR, "dexen", "user", "outputs")
DATABASE_DIR = os.path.join(PROJECT_DIR, "dexen", "system", "server", "database")
DATABASE_DIR = DATABASE_DIR.replace("\\", "\\\\")

IMAGE_DIRNAME = "images" 
MODEL_DIRNAME = "models"

METAFILE = ".dexen"

RUNNING = 1
STOPPED = 2

PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL

MANUAL = "MANUAL"
ONCE = "RUN ONCE"
LOOPED = "RUN LOOPED"

INT = "int"
OBJ = "object"
BLOB = "object"
FLOAT = "float"
STRING = "str"
BOOLEAN = "bool"

ASC = "asc()"
DSC = "desc()"

MINIMIZE = "min"
MAXIMIZE = "max"

EQUAL = "=="
NOT_EQUAL = "!="
GREATER = ">"
GREATER_EQUAL = ">="
SMALLER = "<"
SMALLER_EQUAL = "<="

